<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<html>
<head>
<title>超市账单管理系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<link type="text/css" rel="stylesheet"
	href="${pageContext.request.contextPath }/css/style.css" />
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<STYLE>
span{
FONT-SIZE: 15px; COLOR: white; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
</STYLE>
 
<SCRIPT language=JavaScript>
function tick() {
var years,months,days,hours, minutes, seconds;
var intYears,intMonths,intDays,intHours, intMinutes, intSeconds;
var today;
today = new Date(); //系统当前时间
intYears = today.getFullYear(); //得到年份,getFullYear()比getYear()更普适
intMonths = today.getMonth() + 1; //得到月份，要加1
intDays = today.getDate(); //得到日期
intHours = today.getHours(); //得到小时 
intMinutes = today.getMinutes(); //得到分钟
intSeconds = today.getSeconds(); //得到秒钟
 
years = intYears + "-"; 
 
if(intMonths < 10 ){
months = "0" + intMonths +"-";
} else {
months = intMonths +"-";
}
 
if(intDays < 10 ){
days = "0" + intDays +" ";
} else {
days = intDays + " ";
}
 
if (intHours == 0) {
hours = "00:";
} else if (intHours < 10) {
hours = "0" + intHours+":";
} else {
hours = intHours + ":";
}
 
if (intMinutes < 10) {
minutes = "0"+intMinutes+":";
} else {
minutes = intMinutes+":";
}
 
if (intSeconds < 10) {
seconds = "0"+intSeconds+" ";
} else {
seconds = intSeconds+" ";
}
 if(hours<12){
  var a ="上午好!";
 }else{
   var a ="下午好!";
 }
timeString =a+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+
"当前时间: "+years+months+days+hours+minutes+seconds;
Clock.innerHTML = timeString;
window.setTimeout("tick();", 1000);
}
window.onload = tick;
</SCRIPT>
</head>
<body >
	<div id="header">
		<div class="title"></div>
		<div class="welcome">
		<c:if test="${sessionScope.userSession.userType==1 }">
		系统管理员:
		</c:if>
		<c:if test="${sessionScope.userSession.userType==2 }">
		经理:
		</c:if><c:if test="${sessionScope.userSession.userType==3 }">
		普通员工:
		</c:if>
		 ${userSession.userName }  
        <SPAN  id="Clock"></SPAN>
	
</body>
</body>
</html>

